import java.io.*;

public class demo1 {
    public static void main(String[] args) throws IOException {
        File file = new File("../test.txt");
        Writer writer = new FileWriter("../test.txt",true);
        for(char c = 'a';c<='z';c++){
            writer.write(c);
        }
        writer.flush();
        Reader reader = new FileReader("../test.txt");
        while (true){
            int n = reader.read();
            if(n==-1){
                break;
            }
            System.out.println((char)n);
        }

        reader.close();
        writer.close();

    }
}
